package only.my.railgunys.shooting;

import only.my.railgunys.artifact.ArtifactSuitEffect;
import only.my.railgunys.artifact.imp.CrimsonWitch;
import only.my.railgunys.artifact.imp.Gladiator;
import only.my.railgunys.artifact.imp.RetracingBolide;
import only.my.railgunys.artifact.imp.WanderersTroupe;
import only.my.railgunys.bean.Character;
import only.my.railgunys.bean.Weapon;
import only.my.railgunys.utils.Crutch;
import only.my.railgunys.weapon.DodocoTales;
import only.my.railgunys.weapon.LostPrayerSacredWinds;
import only.my.railgunys.weapon.MemoryOfDust;
import only.my.railgunys.weapon.SkywardAtlas;
import org.springframework.stereotype.Component;

import java.util.List;

import static only.my.railgunys.preparation.SingleData.getSceneList;

@Component
public class Yanfei extends RoleScene {

    @Override
    public void calcWeaponData(){
        Weapon dodocoTales = new DodocoTales(5);
        calcArtifactSuit(dodocoTales);
        Weapon lostPrayerSacredWinds = new LostPrayerSacredWinds(1,2); // 平均2层
        calcArtifactSuit(lostPrayerSacredWinds);
        Weapon memoryOfDust = new MemoryOfDust(1,5); // 5层
        calcArtifactSuit(memoryOfDust);
        Weapon skywardAtlas = new SkywardAtlas(1);
        calcArtifactSuit(skywardAtlas);
    }

    @Override
    protected void calcArtifactSuit(Weapon weapon) {
        ArtifactSuitEffect gladiator = new Gladiator();
        ArtifactSuitEffect wanderersTroupe = new WanderersTroupe();
        ArtifactSuitEffect retracingBolide = new RetracingBolide();
        CrimsonWitch crimsonWitch = new CrimsonWitch();

        List<Character> characters = calcSuit4(weapon, wanderersTroupe);
        sceneRepository.saveAll(getSceneList(characters));
        List<Character> characters1 = calcSuit4(weapon, retracingBolide);
        sceneRepository.saveAll(getSceneList(characters1));
        List<Character> characters2 = calcSuit22(weapon, crimsonWitch, gladiator);
        sceneRepository.saveAll(getSceneList(characters2));
    }

    @Override
    public void addTeam(Character character){
        Crutch.doubleFireTeam(character);
//        Crutch.noblesseBennett(character);
//        Crutch.vv4Kazuha(character);
        Crutch.tmZhongli(character);
    }

    @Override
    public Character initRoleBaseInfo(){
        Character yanfei = new Character();

        yanfei.setHp(9352.0);
        yanfei.setAtk(240.0);
        yanfei.setRole(8);
        yanfei.setCritDmg(50D);
        yanfei.setCritRate(25D); //命座2
        yanfei.setLevel(90);
        yanfei.setDescription("90烟绯");
        yanfei.setIncrease(24.0); //突破24火伤
        yanfei.addIncrease(20.0); //4丹火印
        yanfei.addIncrease(59.6); //9级Q
        yanfei.setSkillDmg(2.7292+0.8); // 10级重击+暴击天赋
        yanfei.setAtkUseful(true);
        yanfei.setCritRateUseful(true);
        yanfei.setElementDmgUseful(true);
        return yanfei;
    }
}
